package com.tengju.bff.interfaces.covercharge.constant;

/**
 * @Author: xx
 * @Description: 奖惩申请单状态
 * @Date: 2020/12/16 16:37
 */
public enum RewardPunishStatusEnum {
    /**
     * 已创建-草稿态
     */
    CREAT(0, "草稿态"),

    /**
     * 已提交-待审核
     */
    CHECKING(1, "待审核"),

    /**
     * 审核通过
     */
    PASS(2, "审核通过"),

    /**
     * 已提交-审核拒绝
     */
    REJECT(3, "审核拒绝"),

    /**
     * 已撤销
     */
    REVOKE(4, "已撤销"),

    /**
     * 审核拒绝 - 已编辑
     */
    REJECT_UPDATE(5, "审核拒绝-已编辑"),

    /**
     * 原单号已撤销
     */
    REVOKE_UPDATE(7, "原单号已撤销"),

    /**
     * 已删除
     */
    DELETE(6, "已删除"),
    ;

    private Integer status;

    private String msg;

    RewardPunishStatusEnum(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }

    public static RewardPunishStatusEnum getStatusDesc (Integer status){
        for(RewardPunishStatusEnum statusEnum : (RewardPunishStatusEnum.values())){
            if(statusEnum.getStatus().equals(status)){//如果传入的code与此枚举code相同，则返回此枚举
                return statusEnum;
            }
        }
        return null;
    }
}
